更新 Withdrawal 对象

审核一笔用户提现申请,如果确认提现,则会发起真实提现打款。如果使用测试模式的 API Key,则不会发生真实交易。

请求参数描述
APP_ID required string对应 app 对象的 id,该参数仅需要填写在请求地址内,查看 如何获取App ID
WITHDRAWAL_ID required string提现对象的 id,该参数仅需要填写在请求地址内。
status required string取值范围:确认为 pending,取消为 canceled

返回

返回一个 withdrawal 提现对象,或者返回一个错误,详见 错误

说明

Withdrawal 对象会根据渠道的返回置为 "succeeded"、"failed"、"created" 状态。若提现成功,则 Withdrawal 对象的 status 值变为 succeeded,Ping++ 会发送提现成功的 Webhooks 通知;若提现因用户原因失败(如提现账户有误),则 Withdrawal 对象的 status 值变为 failed,Ping++ 会发送提现失败的 Webhooks 通知;若提现因非用户原因失败(商户付款金额不足),则 Withdrawal 对象的 status 值变为 created

定义

PUT https://api.pingxx.com/v1/apps/{APP_ID}/withdrawals/{WITHDRAWAL_ID}
待补充
待补充
待补充
待补充
待补充
待补充
待补充

请求示例

curl https://api.pingxx.com/v1/apps/{app_id}/withdrawals/{WITHDRAWAL_ID} \
-H "Pingplusplus-Request-Timestamp: 1475029155" \
-H "Pingplusplus-Signature: SIGNATURE" \
-u sk_test_ibbTe5jLGCi5rzfH4OqPW9KC:
-d '{
   "status": "pending"
}'
待补充
待补充
待补充
待补充
待补充
待补充
待补充

返回示例

{
    "id": "1701611150302360654",
    "object": "withdrawal",
    "app": "app_1Gqj58ynP0mHeX1q",
    "amount": 20000,
    "asset_transaction": "",
    "balance_transaction": "",
    "channel": "unionpay",
    "created": 1472648887,
    "description": "test232description",
    "extra": {
        "account": "6225210207073918",
        "name": "姓名",
        "open_bank_code": "0102",
        "prov": "上海",
        "city": "上海"
    },
    "fee": 200,
    "livemode": true,
    "metadata":{},
    "order_no": "20160829133002",
    "source": null,
    "status": "pending",
    "time_canceled": null,
    "time_succeeded": null,
    "user": "user_001",
    "user_fee": 50
}